//
//  MessageSession.m
//  SouthChina
//
//  Created by creator_lq on 14/12/4.
//  Copyright (c) 2014年 科创. All rights reserved.
//

#import "MessageSession.h"

@implementation MessageSession

@synthesize sess_id;
@synthesize sessionPic;
@synthesize text;
@synthesize title;
@synthesize badgeNumber;
@synthesize sessionType;
@synthesize oppositeId;
@synthesize isremind;


//String sessionId, String sessionType, String oppositeId, String title, String text, String sessionPic, String isremind, Date updatime, Map<String, Object> otherInfo

-(MessageSession*) initWithData:(NSString*)_ses_id sesType:(NSString*)_sessionType oppositeId:(NSString*)_oppositeId title:(NSString*)_title text:(NSString*)_text sessionPic:(NSString*)_sessionPic isremind:(NSString*)_isremind updatime:(NSDate*) _uupdatime otherInfo:(NSDictionary*) _otherInfo{
    
    sess_id = _ses_id;
    sessionPic =_sessionPic;
    text=_text;
    title = _title;
    badgeNumber = [DE.userId isEqualToString:oppositeId]?0:1;
    sessionType = _sessionType;
    oppositeId = _oppositeId;
    isremind = _isremind;
    self.upate_time = _uupdatime;
    
    if (_otherInfo) {
        NSString *info = [_otherInfo JSONString];
        self.otherInfo = info;
    } else {
        self.otherInfo = @"";
    }
    return self;
}


@end
